<?php
class AuthController extends Zend_Controller_Action {
	public function loginAction() {
		$db 	= $this->_getParam('db');
		$form	= new Application_Form_Auth_Login();

		/*if($form->isValid($_POST)) {
			$adapter = new Zend_Auth_Adapter_DbTable(
				$db,
				'users',
				'username',
				'password',
				'MD5(CONCAT(?, salt))'
			);

			$adapter->setIdentity($loginForm->getValue('username'));
			$adapter->setCredential($loginForm->getValue('password'));

			$result = $auth->authenticate($adapter);

			if($result->isValid()) {
				$this->_helper->FlashMessenger('Erfolgreich angemeldet');
				$this->redirect('/');
				return;
			}
		}*/

		$this->view->form = $form;
	}
}
?>
